package com.socialsoftware.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

import java.io.Serializable;
import java.util.Date;

/**
 * 好友请求实体类
 * 用于存储收到的好友请求信息
 */
@Entity(tableName = "friend_requests")
public class FriendRequest implements Serializable {
    
    @PrimaryKey
    private Long id;
    
    private Long requesterId;
    private String requesterName;
    private String requesterAvatar;
    
    private Long addresseeId;
    private String addresseeName;
    
    private String requesterNote;
    private String status; // PENDING, ACCEPTED, REJECTED, BLOCKED
    
    @TypeConverters(AppDatabase.DateConverter.class)
    private Date createdAt;
    
    @TypeConverters(AppDatabase.DateConverter.class)
    private Date updatedAt;
    
    // 构造函数
    public FriendRequest() {
    }
    
    public FriendRequest(Long id, Long requesterId, String requesterName, String requesterAvatar, 
                         Long addresseeId, String addresseeName, String requesterNote, 
                         String status, Date createdAt, Date updatedAt) {
        this.id = id;
        this.requesterId = requesterId;
        this.requesterName = requesterName;
        this.requesterAvatar = requesterAvatar;
        this.addresseeId = addresseeId;
        this.addresseeName = addresseeName;
        this.requesterNote = requesterNote;
        this.status = status;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getRequesterId() {
        return requesterId;
    }
    
    public void setRequesterId(Long requesterId) {
        this.requesterId = requesterId;
    }
    
    public String getRequesterName() {
        return requesterName;
    }
    
    public void setRequesterName(String requesterName) {
        this.requesterName = requesterName;
    }
    
    public String getRequesterAvatar() {
        return requesterAvatar;
    }
    
    public void setRequesterAvatar(String requesterAvatar) {
        this.requesterAvatar = requesterAvatar;
    }
    
    public Long getAddresseeId() {
        return addresseeId;
    }
    
    public void setAddresseeId(Long addresseeId) {
        this.addresseeId = addresseeId;
    }
    
    public String getAddresseeName() {
        return addresseeName;
    }
    
    public void setAddresseeName(String addresseeName) {
        this.addresseeName = addresseeName;
    }
    
    public String getRequesterNote() {
        return requesterNote;
    }
    
    public void setRequesterNote(String requesterNote) {
        this.requesterNote = requesterNote;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public Date getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    
    public Date getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }
} 